@import '../../styles/mixins/mixin'; //导入公共样式


.btn {
    position: relative;
    display: inline-block;
    white-space: nowrap;
    text-align: center;
    vertical-align: middle;
    background-image: none;
    border: $btn-border-width solid transparent;
    cursor: pointer;
    color: $body-color;
    /*
    padding: $btn-padding-y $btn-padding-x;
    font-size: $btn-font-size;
    border-radius: $btn-border-radius;
    */
    //调用mixin中定义的方法，对这些公用设置进行抽离
    @include button-size($btn-padding-x, $btn-padding-y, $btn-font-size, $btn-border-radius);

    font-weight: $btn-font-weight;
    line-height: $btn-line-height;

    box-shadow: $btn-box-shadow;
    transition: $btn-transition;

    &.disabled,
    &[disabled] {
        cursor: not-allowed;
        opacity: $btn-disabled-opacity;
        box-shadow: none;

        >* {
            pointer-events: none;
        }
    }
}

.btn-lg {
    @include button-size($btn-padding-x-lg, $btn-padding-y-lg, $btn-font-size, $btn-border-radius);
}

.btn-sm {
    @include button-size($btn-padding-x-sm, $btn-padding-y-sm, $btn-font-size, $btn-border-radius);
}

.btn-primary {
    @include button-style($primary, $primary, $white)
}

.btn-danger {
    @include button-style($danger, $danger, $white)
}

.btn-default {
    @include button-style($white, $gray-400, $body-color, $white, $primary, $primary)
}

.btn-link {
    font-weight: $font-weight-normal;
    color: $btn-link-color;
    text-decoration: $link-decoration;
    box-shadow: none;

    &:hover {
        color: $btn-link-hover-color;
        text-decoration: $link-hover-decoration;
    }

    &:focus,
    &.focus {
        text-decoration: $link-hover-decoration;
        box-shadow: none;
    }

    &:disabled,
    &.disabled {
        color: $btn-link-disabled-color;
        pointer-events: none;
    }
}


//定义一个方法
@mixin blockquote($block) {
    $blockName: $namespace + $block !global;

    .#{$blockName} {
        @content;
    }

}

.#{$namespace}-btn-1 {
    width: 100px;
}


//调用blockquote方法
@include blockquote(button) {}